package com.NoteDao;

import com.jiazhong.Student;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

import java.util.List;

public interface NoteSqlDao {
    @Select("select * from student")
    List<Student> selectAll();

    @Insert("insert into student values(null,#{sname},#{ssex},#{sage},#{sdepartment})")
    void insert(Student student);

    @Update("update student set ssex=#{ssex},sage=#{sage},sdepartment=#{sdepartment} where sname=#{sname}")
    void update(Student student);



}
